<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" content="全国30万家酒店查询服务和16000余家酒店2折起免费预订服务;预订电话：[%$ordertel%].订酒店,赢积分,免费兑换机票" />
<meta name="Keywords" content="旅易中国,酒店预订,酒店查询,宾馆预订,宾馆查询,酒店价格,宾馆价格,住宿,旅馆预订,快捷酒店,经济型酒店,经济型连锁,连锁酒店,连锁品牌,连锁快捷,商务酒店" />
<title>酒店评论</title>
<script type="text/javascript" src="[%$url%]templates/greenhotel/js/jquery.js?v=[%$softversion%]"></script>
<style>
body{font-size:12px;font-family:Arial, Helvetica, sans-serif,宋体;color:#000; margin:0px;text-align:center;}div,dl{margin:0 auto;padding:0;}
from,ul,dl,img,,span,h1,h2,h3,h4,h5,h6,h7,p{border:0;}.clear{clear:both;height:0px;font-size:1px;overflow:hidden;}
h1,h2,h3,h4,h5,h6,h7,form,span,select,input,ul,li,dl,dt,dd,label,img,p{padding:0;margin:0;}li,dd{list-style:none;overflow:hidden;}
.main { width:770px; float:right; margin-top:10px; clear:both} a,a:hover{ text-decoration:none;}
.main h1{font-size:14px; text-indent:20px; background-color:#f8f8f8; display:block; text-align:left; height:36px; line-height:36px; border-top:1px solid #dfdfdf;}
.main dl{ margin-top:5px; width:98%; clear:both;} .main dt{ height:20px; line-height:20px; background-color:#f3f3f3; color:#999; text-align:left;}
span.l{ display:block; text-indent:10px; float:left;} span.r{ display:block; float:right; padding-right:10px; color:#e26000;}
.main dd.c{ padding-left:18px; line-height:22px; text-align:left; margin-top:5px;}
.main .add{ margin-top:5px; width:98%; clear:both; } .add h3{ display:block; height:20px; line-height:20px; font-size:14px; text-indent:20px; text-align:left; }
.add dl.bd { text-align:left;} .add dl.bd dd{ text-align:left; color:#e26000; margin-top:5px; } .add dd label{ color:#000;}
.pagelink{ text-align:center; color:#666; padding-left:50px; width:85%;}
.pagelink a,.pagelink a:hover{ display:block; width:20px; height:20px; line-height:20px; border:1px solid #d9d9d9; color:#666; float:left; margin:5px; background:#efefef;}
.pagelink span{ border:1px solid #c75400; color:#fff; width:20px; height:20px; line-height:20px; margin-top:5px; background:#ee6000; display:block; float:left;}
.pagelink span.all{ display:block; border:none; background:none; width:150px; color:#666; line-height:20px; float:left;}
.pagelink a.nobg,.pagelink a.nobg:hover{ width:40px; border:0; background:none;}
#searchtips { border:1px solid #949494; width:300px; height:50px; line-height:50px; position:absolute; display:none; color:#0069ca; background-color:#fff; z-index:999;}
#pageNav { height:33px; line-height:33px; text-align:left; border-bottom:1px solid #f2f2f2;}
#pageNav p{ color:#7f7f7f; text-indent:11px;} #pageNav p a{ color:#7f7f7f;} #pageNav p a:hover{ color:#CC4233;}
</style>
<script type="text/javascript">
$(document).ready(function(){
	$("#commentsubmit").click(function(){
		var comment = $("#word").val();
		if(comment == "" || comment.length<10) {
			alert("对不起，评论内容不能为空并且不能少于10个字符。");
			$("#word").focus();
			return false;
		}
		if(comment.length > 200) {
			alert("对不起，评论不能超过200字。");
			$("#word").focus();
			return false;
		}
		var formurl = $("#formurl").val();
		var hid = $("#hid").val();
		var hname = $("#hname").val();
		var level = 0;
		$("input[name='level']:checked").each(function(){
			level = $(this).val();
		});
		var cityid = $("#cityid").val();
		$.post(formurl,{hid:hid,hname:hname,level:level,cityid:cityid,comment:encodeURIComponent(comment),ran:Math.random()},
		function(data){
			if(data > 0) {
				alert("恭喜你点评提交成功");
				window.location.reload();
			} else if(data == -1) {
				alert("对不起，点评提交失败，请稍后再试");
			} else if(data == -2) {
				alert("对不起，只有会员点评酒店，请你登录，如果你没有账号请你注册。");
			}
		});
	});
});
</script>
</head>
<body>
<div class="main" id="commentlist">
	<h1>客人点评</h1>
    [%if count($array) > 0%]
    [%forlist from=$array key=i%]
    <dl>
    	<dt><span class="l">[%$array[i].username|cuthtml(3,'***','')%] [%$array[i].date%]</span> <span class="r">评级 [%$array[i].level|get_level(0)%]</span></dt>
        <dd class="c">[%$array[i].comment%]</dd>
    </dl>
    
	[%/forlist%]
    <div style="clear:both; margin-top:10px;"></div>
	<div class="pagelink"><span class="all">共<b>[%$countnum%]</b>条评论[%$page%]/[%$numpage%]页</span><a href="[%$pageindex%]"class="nobg">首页</a><a class="nobg" href="[%$pagepre%]">上一页</a>[%$pagetext%]<a class="nobg"href="[%$pagenext%]">下一页</a><a class="nobg"href="[%$pagetotal%]">末页</a></div>
    [%else%]
    <dl><dd>还没有点评</dd></dl>
    [%/if%]
    <div class="add">
   		<h3>发表评论</h3>
        <dl class="bd">
            <dd><label>评级:　</label><input type="radio" name="level" value="1" />★<input type="radio" name="level" value="2" />★★<input type="radio" checked="checked" name="level" value="3" />★★★<input type="radio" name="level" value="4" />★★★★<input type="radio" name="star" value="5" />★★★★★</dd>
            <dd><label>内容:　</label><textarea name="word" cols="80" rows="5" id="word"></textarea></dd>
            <dd>　　　<input type="hidden" id="hid" name="hid" value="[%$hid%]" /><input type="hidden" id="formurl" name="formurl" value="[%$commentsave%]" /><input type="hidden" id="hname" name="hname" value="[%$hname%]" /><input type="hidden" id="cityid" name="cityid" value="[%$cityid%]" /><input type="button" id="commentsubmit" name="commentsubmit" value="发表评论" />(最多不能超过200字)　　<a href="[%$arrlink['login']%]" target="_top">登录</a></dd>
        </dl>
    </div>
</div>


</body>
</html>